from random import choice
class RandomWalk():
    def __init__(self,point_num:int = 5000):
        self.point_num = point_num

        self.xValues = [0]
        self.yValues = [0]
    
    def fill_walk(self):        
        while len(self.xValues) < self.point_num:
            x_step = self.get_random_step()
            y_step = self.get_random_step()

            if x_step==0 and y_step==0:
                continue

            x_next = self.xValues[-1]+x_step
            y_next = self.xValues[-1]+y_step

            self.xValues.append(x_next)
            self.yValues.append(y_next)

    def get_random_step(self):
        dir = choice([1,-1])
        step = choice([1,2,3,4])

        return dir*step